/********************************************************/
/*	Author:		gong_libin			*/
/*	Date:		2015_02_07			*/
/*	File:		GtDcpDef.h			*/
/********************************************************/

#ifndef	_GTDCPDEF_H
#define	_GTDCPDEF_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#define	GT_DD_MSG			0x08
#define	GT_DD_MNI			0x10
#define	GT_DD_MAX			0xffff
#define	GT_DD_MNB			0x100000

#define	GT_DD_KEY			'D'
#define	GT_DD_PATH			(char*)"/tmp"

#define	GT_DD_KRM2			'A'
#define	GT_DD_KHTP			'B'
#define	GT_DD_KPST			'C'
#define	GT_DD_K3GC			'D'
#define	GT_DD_K3GU			'E'
#define	GT_DD_KRED			'F'
#define	GT_DD_KKFK			'G'
#define	GT_DD_KRAD			'H'
#define	GT_DD_KFHP			'I'
#define	GT_DD_KFRD			'J'
#define	GT_DD_KDNS			'K'
#define	GT_DD_KIDM			'Z'

#define	GT_DD_CTTL			0x20
#define	GT_DD_CTRL			(char*)"/var"

#define	GT_DD_FLAG			0x93

/* type */
#define	GT_DD_STDS			0x01	// Standard
#define	GT_DD_FFCS			0x02	// Ffcs

/* verb */
#define	GT_DD_HTTP			0x01	// Http
#define	GT_DD_RADS			0x02	// Radius
#define	GT_DD_POST			0x03	// Post
#define	GT_DD_GTPC			0x04	// Gtp_c
#define	GT_DD_GTPU			0x05	// Gtp_u
#define	GT_DD_IDMP			0x06	// IdMap
#define	GT_DD_VDNS			0x07	// Dns

/* attr */
#define	GT_DD_WEBS			0x01	// web sample
#define	GT_DD_USRS			0x02	// usr sample
#define	GT_DD_FULL			0x04	// full dose

#define	GT_DD_PCRT			0x01	// pdp create
#define	GT_DD_PUPD			0x02	// pdp update
#define	GT_DD_PDEL			0x03	// pdp delete

/* rads */
#define	GT_DD_USID			0x01	// User-Name
#define	GT_DD_USIP			0x02	// Framed-IP-Address
#define	GT_DD_STAT			0X03	// Acct-Status-Type
#define	GT_DD_STPT			0x04	// Start port
#define	GT_DD_EDPT			0x05	// End port
#define	GT_DD_NTTP			0x06	// Nat type
#define	GT_DD_AREA			0x07	// Area id
#define	GT_DD_TELE			0x08	// Telecom
#define	GT_DD_USPT			0x09	// User-Port

/* http */
#define	GT_DD_HOST			0x01	// Host
#define	GT_DD_HURI			0x02	// URI
#define	GT_DD_REFE			0x03	// Referer
#define	GT_DD_UAGT			0x04	// User-Agent
#define	GT_DD_COOK			0x05	// Cookie
#define	GT_DD_LANG			0x06	// Accept-Language
#define	GT_DD_MIME			0x07	// MimeType
#define	GT_DD_METH			0x08	// Method
#define	GT_DD_NODE			0x09	// Post node

#define	GT_DD_SADD			0x11	// Src ip
#define	GT_DD_DADD			0x12	// Dst ip
#define	GT_DD_SPOT			0x13	// Src port
#define	GT_DD_DPOT			0x14	// Dst port
#define	GT_DD_HSEQ			0x15	// Seq code
#define	GT_DD_HACK			0x16	// Ack code
#define	GT_DD_MPID			0x17	// IdMp uid

/* mobile */
#define	GT_DD_TEID			0x21	// gtp teid
#define	GT_DD_IMSI			0x22	// gtp imsi
#define	GT_DD_IMEI			0x23	// gtp imei
#define	GT_DD_MBDS			0x24	// mobile dev
#define	GT_DD_MBNB			0x25	// mobile num

#define	GT_DD_LGIN			0x01	// Login
#define	GT_DD_LGOT			0x02	// Logout
#define	GT_DD_LGUP			0x03	// Update
#define	GT_DD_LGCV			0x04	// Cover

/* msg */
typedef struct tagGtDcpMsg
{
	int m_iLength;
	UCHAR m_uszMsg[GT_KBYTES4];
}GTDCPMSG_S;

/* dev info */
typedef struct tagGtDcpShmInfo
{
	char m_szPid[GT_BYTE32];
	char m_szDev[GT_BYTE32];
}GTDCPSHMINFO_S;

/* statistics info */
typedef struct tagGtDcpShmBase
{
	ULONGLONG m_ullRcvPkts;			//recv packets 
	ULONGLONG m_ullSndPkts;			//send packets
	ULONGLONG m_ullRcvByte;			//recv packets byte
	ULONGLONG m_ullSndByte;			//send packets byte
	ULONGLONG m_ullPktErrs;			//recv packets error
	ULONGLONG m_ullPktErrsByte;		//recv packets error byte
	ULONGLONG m_ullParseErrs;		//packets parse error
	ULONGLONG m_ullParseErrsByte;		//packets parse error byte
	ULONGLONG m_ullDrpPkts;			//packets drop
	ULONGLONG m_ullDrpByte;			//packets drop byte
	ULONGLONG m_ullQueErrs;			//put queue error
}GTDCPSHMBASE_S;

/* devs */
typedef struct tagGtDcpShmDevs
{
	GTDCPSHMINFO_S m_stInfo;
	GTDCPSHMBASE_S m_stBase;
}GTDCPSHMDEVS_S;

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _GTDCPDEF_H */
